import React, { useState, lazy } from 'react'
import { Switch, HashRouter, Route } from 'react-router-dom'
import Home from './pages/home'
const Demo = lazy(() => import("./pages/demo"));
const IosFixed = lazy(() => import("./pages/iosFixed"));
// import Demo from './pages/demo'
// import IosFixed from './pages/iosFixed'
import { data as menuData } from './config/menu'
import './style/reset.css'
import './style/common.scss'
import './App.scss'

function App() {
  console.log('~~menuData', menuData)
  return <HashRouter>
    <Switch>
      <Route exact path='/' component={Home} />
      {menuData.map(item => <Route path={item.path} component={item.component} key={item.path} />)}
    </Switch>
  </HashRouter>

}

export default App
